package wt.hpad;

import android.app.Application;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

import org.litepal.LitePal;

import wt.hpad.utils.ThreadUtil;

/**
 * 程序入口
 * Created by wt on 12.13.
 */

public class MainApp extends Application {
    static Context mContext;

    @Override
    public void onCreate() {
        super.onCreate();
        LitePal.initialize(this);
        // 初始化线程池
        ThreadUtil.buildPool();
        // 创建数据库
        SQLiteDatabase db = LitePal.getDatabase();
        mContext = getApplicationContext();
        // 显示项过滤
        ConstantFields.initShowItems(getApplicationContext());
        ConstantFields.initBasicInfo(getApplicationContext());
    }

    public static Context getContext() {
        return mContext;
    }
}
